package com.coincalf.task.web;

import com.coincalf.feign.MarketServiceClient;
import com.coincalf.feign.TradingAreaServiceClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author qiang
 */
@RestController
@RequestMapping("/quotes")
public class QuoteController {

    @Autowired
    private MarketServiceClient marketServiceClient;
    @Autowired
    private TradingAreaServiceClient tradingAreaServiceClient;

    @GetMapping("/trade_markets")
    Object tradeMarketList() {
        return marketServiceClient.tradeMarkets();
    }

    @GetMapping("/forex_markets")
    Object forexMarketList() {
        return marketServiceClient.forexMarkets();
    }

    @GetMapping("/trading_area")
    Object tradingAreaList() {
        return tradingAreaServiceClient.tradingAreaList();
    }
}
